| Conditions | 1 |
| Paths | 1 |
| Total Lines | 42 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | describe('Direct Generator', function () { |
||
| 2 | it('Test Direct Remoting exist', function() { |
||
| 3 | expect(Test.TestBundle).toBeDefined(); |
||
|
|
|||
| 4 | expect(Test.TestBundle.Test.test).toBeDefined(); |
||
| 5 | }); |
||
| 6 | it('Execute test Remoting method', function() { |
||
| 7 | var value = ""; |
||
| 8 | Test.TestBundle.Test.test(function(data) { |
||
| 9 | value = data; |
||
| 10 | }); |
||
| 11 | waitsFor(function() { |
||
| 12 | return (value != "") |
||
| 13 | }, "The Value should be set", 2000); |
||
| 14 | runs(function() { |
||
| 15 | expect(value['result']).toBe('test'); |
||
| 16 | }); |
||
| 17 | }); |
||
| 18 | it('Execute test Remoting method with parameter', function() { |
||
| 19 | var value = ""; |
||
| 20 | Test.TestBundle.Test.test2("asd", function(data) { |
||
| 21 | value = data; |
||
| 22 | }); |
||
| 23 | waitsFor(function() { |
||
| 24 | return (value != "") |
||
| 25 | }, "The Value should be set", 2000); |
||
| 26 | runs(function() { |
||
| 27 | expect(value['result']).toBe('asd'); |
||
| 28 | }); |
||
| 29 | }); |
||
| 30 | it('Execute test Remoting method with request parameter', function() { |
||
| 31 | var value = ""; |
||
| 32 | Test.TestBundle.Test.testRequestParam({"id":"asd"}, function(data) { |
||
| 33 | value = data; |
||
| 34 | }); |
||
| 35 | waitsFor(function() { |
||
| 36 | return (value != "") |
||
| 37 | }, "The Value should be set", 2000); |
||
| 38 | runs(function() { |
||
| 39 | expect(value['result']).toBe('asd'); |
||
| 40 | }); |
||
| 41 | }); |
||
| 42 | }); |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.